import axios from "axios";


export function request(config) {

  // 创建对象
  const instance = axios.create({
    baseURL: "http://localhost:8888",
    timeout: 5000,
    headers: {
      'content-type': 'application/json'
    }
  });
  // 拦截器
  instance.interceptors.request.use(config => {
    return config
  },err => {

  })
  instance.interceptors.response.use(res => {
    return res.data
  },err => {
    
  })

  return instance(config);
}